﻿namespace Grow.Module.Builder
{
    public interface IBuilderManager
    {
        /// <summary>
        /// 获取构建对象
        /// </summary>
        /// <typeparam name="TBuilder"></typeparam>
        /// <returns></returns>
        TBuilder? GetBuilder<TBuilder>() where TBuilder : IBuilder;

        /// <summary>
        /// 获取构建对象
        /// </summary>
        /// <typeparam name="TBuilder"></typeparam>
        /// <returns></returns>
        TBuilder GetRequiredBuilder<TBuilder>() where TBuilder : IBuilder;

        /// <summary>
        /// 添加构建对象
        /// </summary>
        /// <typeparam name="TBuilder"></typeparam>
        /// <param name="builder"></param>
        void SetBuilder<TBuilder>(TBuilder builder) where TBuilder : IBuilder;
    }
}
